FC Coding is
One step from 1st Principles to Solution!

Home



Oil Refinery Production Model Code
to simulate ONE distillation unit at a time.

Oil Processing FlowchartProblem Description: An oil company may have many different distillation processes going on at each of its refineries. Each time new crude oil arrives at a refinery, or one distillation unit goes in or out of service, a new tweaking of all distillation parameters must be done in order to maximize / minimize the company’s objective.



Goal for this page: simulate one distillation unit at a time in each refinery. Verify results and fix any discrepancies.


On this page, we'll attempt to guide you through the various model routines in order to create a 'picture' for you to understand what's going on.

1. To start, set iRefinery = 'i'th unit and any Distillation unit 'jDistillUnit' at this refinery and test to see if working, then try another 'jDistillUnit' and so on until all units at this 'iRefinery' refinery are running properly. Next, change 'iRefinery' refinery setting to another refinery and step through all it's Distillation units until all are working properly and results agree with what is presently being produced.

iRefinery = 2: jDistillUnit = 7

2. Build the Processing model that states how the crude oil is broken down into the sellable oil units; e.g., 10, 20, 30, 90 grades. Think distribution! Where are the different grades to be sold? Heavy grades in the cold parts and light grades in the hot parts of the country. So, in order to help minimize cost, produce the oil products in their appropriate regions.

Lots of (PDE) equation work goes in this model. It is a key to a good model and may take some time to complete, but be careful that your results agree with current day productions.

model Processing ! 'j'th distillation unit @ ith refinery i = iRefinery: j = jDistillUnit Key point ! assume distillation requires solving a PDE or two. ! below is the bases for solving a PDE. t = 0: tPrt = tPrint Initiate ISIS for PDEquations ooo do while (t .lt. tFinal) Integrate PDEquations by ISIS if( t .ge. tPrt) print 79, t, (U(ii),ii = 1,ip) tPrt = tPrt + tPrint end do end do crudeErr = crudeErr+(totCrudeIn(i, j)– crudeUsed)**2 79 format( 1x,f8.4,20(g14.5, 1x)) end model PDEquations if( j .eq. 1) then pde_1 = pde equations with parameters ! assume # 3, 7, & 8 products are created qtyProd(3) = qtyProd(3) + ??? qtyProd(7) = qtyProd(7) + ??? qtyProd(8) = qtyProd(8) + ??? elseif( j .eq. 2) then pde_2 = pde equations with parameters ! assume # 2 & 8 products are created qtyProd(2) = qtyProd(2) + ??? qtyProd(8) = qtyProd(8) + ??? ooo end if crudeUsed = crudeUsed + ??? pollution = pollution + ??? cost = cost + mfgCost + distCost + ??? profit = profit + ??? - cost end

This example shows solving just ONE distillation unit in one refinery. Step through all distillation units in each refinery. Be sure each run's output is in agreement with what is currently being produced by each distillation unit. Once in agreement, move on to another unit and continue testing to be sure your math model agrees with reality.

The next article will show an entire refinery model being solved in one run, do results look good? This is the next building block for this project.



< < Back

Next > >


Problem-Solving Applications include:

CurvFit: a curve fitting program with Lorentzian, Sine, Exponential and Power series are available models to match your data.

Match-n-Freq: a Matched Filter program used to filter signals and slim pulses.

Industry Problem-Solving Descriptions include:

Business Strategies & War Gaming: Buy, Sell, Hold options may be tested for an entire company, individual plant(s), or whole product lines. Imagine an increase in control settings from a 1 or 2 digits (i.e., a guess value) to an 8+ digit accuracy resulting from a Calculus programming calculation!

Pulse Slimming to minimize InterSymbol Interference: via Arbitrary Equalization with Simple LC Structures to reduce errors.

Voice Coil Motor: basically an electromagnetic transducer in which a coil placed in a magnetic pole gap experiences a force proportional to the current passing through the coil.

Electrical Filter Design: find the transfer function's poles & zeros; H(s) = Yout(s) / Yin(s).

Digitized Signal from Magnetic Recording: Magnetic recording of transitions written onto a computer disc drive may produce an isolated pulse as shown.

AC Motor Design: a simulation program for A.C. motor design that was reapplied as a constrained optimization problem with 12 unknown parameters and 7 constraints.

PharmacoKinetics: an open-two- compartment model with first order absorption into elimination from central compartment is presented here.


 
Valid CSS! Calculus (level) Problem-Solving for Engineers & Scientists

Textbooks - Parameter Estimation 4 ODE/PDE - Signal Analysis / Spectral Estimation - Body Plasma - Solar Cell
Increasing Productivity Examples: AC Motor Design - Matched Filters - Pulse Slimming / InterSymbol Interference - Pilot (safe) Ejection - PharmacoKinetics Simulation - Business Strategies & War Gaming - BVP - Implicit Equations